const countReducer = (state = {
    count: 1
}, action) => {
    switch (action.type) {
        case 'COUNT_ADD':
            return {
                ...state,
                count: ++state.count
            };
        case 'COUNT_JIAN':
            return {
                ...state,
                count: --state.count
            };
        default:
            return state;
    }
}


export default countReducer;